// pages/cook/components/cookTeam/cookTeam.js
const app = getApp();

Component({
        /**
         * 组件的属性列表
         */
        properties: {
                cookTeamInfo: {
                        type: Object,
                        value: ""
                }
        },

        /**
         * 组件的初始数据
         */
        data: {
                starUrl: app.APP_OSSURL_API + "/dinnerBar/canyin/canyin-xingji.png",
        },

        attached() {

                this.data.cookTeamInfo.mark = []
                for (var i = 0; i < this.data.cookTeamInfo.score; i++) {
                        this.data.cookTeamInfo.mark.push(this.data.starUrl)
                }
                this.setData({
                        cookTeamInfo: this.data.cookTeamInfo
                })

        },

        /**
         * 组件的方法列表
         */
        methods: {
                toDetail(e) {
                        wx.navigateTo({
                                url: '/pages/cook/kitchenBrigade/kitchenBrigade?id=' + e.currentTarget.dataset.id+'&mchId='+e.currentTarget.dataset.mchid
                        })
                },
        }
})